package com.ruoyi.locate.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.locate.mapper.WWarehouseMapMapper;
import com.ruoyi.locate.domain.WWarehouseMap;
import com.ruoyi.locate.service.IWWarehouseMapService;

/**
 * 仓位地图Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-01-07 08:00:58
 */
@Service
public class WWarehouseMapServiceImpl implements IWWarehouseMapService 
{
    @Autowired
    private WWarehouseMapMapper wWarehouseMapMapper;

    /**
     * 查询仓位地图
     * 
     * @param mapId 仓位地图主键
     * @return 仓位地图
     */
    @Override
    public WWarehouseMap selectWWarehouseMapByMapId(Long mapId)
    {
        return wWarehouseMapMapper.selectWWarehouseMapByMapId(mapId);
    }

    /**
     * 查询仓位地图列表
     * 
     * @param wWarehouseMap 仓位地图
     * @return 仓位地图
     */
    @Override
    public List<WWarehouseMap> selectWWarehouseMapList(WWarehouseMap wWarehouseMap)
    {
        return wWarehouseMapMapper.selectWWarehouseMapList(wWarehouseMap);
    }

    /**
     * 新增仓位地图
     * 
     * @param wWarehouseMap 仓位地图
     * @return 结果
     */
    @Override
    public int insertWWarehouseMap(WWarehouseMap wWarehouseMap)
    {
        wWarehouseMap.setCreateTime(DateUtils.getNowDate());
        return wWarehouseMapMapper.insertWWarehouseMap(wWarehouseMap);
    }

    /**
     * 修改仓位地图
     * 
     * @param wWarehouseMap 仓位地图
     * @return 结果
     */
    @Override
    public int updateWWarehouseMap(WWarehouseMap wWarehouseMap)
    {
        wWarehouseMap.setUpdateTime(DateUtils.getNowDate());
        return wWarehouseMapMapper.updateWWarehouseMap(wWarehouseMap);
    }

    /**
     * 批量删除仓位地图
     * 
     * @param mapIds 需要删除的仓位地图主键
     * @return 结果
     */
    @Override
    public int deleteWWarehouseMapByMapIds(Long[] mapIds)
    {
        return wWarehouseMapMapper.deleteWWarehouseMapByMapIds(mapIds);
    }

    /**
     * 删除仓位地图信息
     * 
     * @param mapId 仓位地图主键
     * @return 结果
     */
    @Override
    public int deleteWWarehouseMapByMapId(Long mapId)
    {
        return wWarehouseMapMapper.deleteWWarehouseMapByMapId(mapId);
    }

    /**
     * 清空w_warehouse_map
     */
    @Override
    public int cleanWarehouseMap()
    {
        return wWarehouseMapMapper.cleanWarehouseMap();
    }

    /**
     * 查询仓位地图，字典项
     *
     * @return 仓位地图集合
     */
    @Override
    public List<WWarehouseMap> selectWWarehouseMapAll()
    {
        return wWarehouseMapMapper.selectWWarehouseMapAll();
    }
}
